package com.ktjiaoyu.crm.exception;

import org.apache.shiro.authz.UnauthorizedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

@ControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(UnauthorizedException.class)
    public ModelAndView unauthorizedException(){
        ModelAndView mav=new ModelAndView();
        mav.setViewName("403");
        return mav;
    }


}
